/*
 Navicat Premium Dump SQL

 Source Server         : SQLSERVER
 Source Server Type    : SQL Server
 Source Server Version : 16001000 (16.00.1000)
 Source Host           : localhost\SQLEXPRESS01:1433
 Source Catalog        : NEUBG
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001000 (16.00.1000)
 File Encoding         : 65001

 Date: 12/08/2025 14:50:59
*/


-- ----------------------------
-- Table structure for account_info
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[account_info]') AND type IN ('U'))
	DROP TABLE [dbo].[account_info]
GO

CREATE TABLE [dbo].[account_info] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [username] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [password] nvarchar(255) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [email] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [phone] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NULL,
  [nickname] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [role_level] int DEFAULT 1 NULL,
  [status] tinyint DEFAULT 1 NULL,
  [create_time] datetime DEFAULT getdate() NULL,
  [update_time] datetime DEFAULT getdate() NULL
)
GO

ALTER TABLE [dbo].[account_info] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键id',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'用户名',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'username'
GO

EXEC sp_addextendedproperty
'MS_Description', N'密码',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'password'
GO

EXEC sp_addextendedproperty
'MS_Description', N'邮箱',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'email'
GO

EXEC sp_addextendedproperty
'MS_Description', N'电话号',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'phone'
GO

EXEC sp_addextendedproperty
'MS_Description', N'昵称',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'nickname'
GO

EXEC sp_addextendedproperty
'MS_Description', N'角色等级（将来有权限根据这个区分）',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'role_level'
GO

EXEC sp_addextendedproperty
'MS_Description', N'在线状态（暂时没用）',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'status'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'create_time'
GO

EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'account_info',
'COLUMN', N'update_time'
GO


-- ----------------------------
-- Auto increment value for account_info
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[account_info]', RESEED, 10)
GO


-- ----------------------------
-- Uniques structure for table account_info
-- ----------------------------
ALTER TABLE [dbo].[account_info] ADD CONSTRAINT [UQ__account___F3DBC572A729AE33] UNIQUE NONCLUSTERED ([username] ASC)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table account_info
-- ----------------------------
ALTER TABLE [dbo].[account_info] ADD CONSTRAINT [PK__account___3213E83FE7504E36] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
